package cn.itcast.bos.quartz;

import cn.itcast.bos.service.base.PromotionService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
@Service
@Transactional
public class PromotionJob implements Job {
    @Autowired
    private PromotionService promotionService;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("活动过期处理程序执行...........");
        //每分钟执行一次,当前打印promotion数据表endDate,活动赢经过期,设置status = "2"
        //promotionService.updateStatus(new Date());


    }
}
